<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:NicoView.View">








    <Style TargetType="{x:Type local:HeaderedTabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:HeaderedTabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="5" />
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="1" BorderBrush="Black" 
			Background="White" BorderThickness="1,1,1,0" 
			CornerRadius="2,2,0,0" />
                        <Grid Grid.Row="0" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter Content="{TemplateBinding Header}" 
				Grid.Column="0" Margin="0,0,5,0" />
                            
                            <TabPanel Grid.Column="1" Background="Transparent" 
				IsItemsHost="True" Panel.ZIndex="1" 
                                    Margin="0,0,5,0"
                                    VerticalAlignment="Bottom" 
				KeyboardNavigation.TabIndex="1"/>
                        </Grid>
                        <Border Grid.Row="2"
                                BorderBrush="Black" BorderThickness="1,0,1,1" 
					CornerRadius="0,0,2,2"
                                KeyboardNavigation.DirectionalNavigation="Contained" 
                                KeyboardNavigation.TabNavigation="Local" 
                                KeyboardNavigation.TabIndex="2">
                            <ContentPresenter x:Name="PART_SelectedContentHost" 
					ContentSource="SelectedContent"/>
                        </Border>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="Gray"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




</ResourceDictionary>
